//
//  YXTestViewController.swift
//  SinaWeiBo
//
//  Created by Vergil on 2017/4/6.
//  Copyright © 2017年 Vergil. All rights reserved.
//

import UIKit

class YXTestViewController: YXMainViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        
        title = "第\(navigationController?.childViewControllers.count ?? 0)个"
        
    }
    
    @objc private func rightBarBtnClick() {
        
        navigationController?.pushViewController(YXTestViewController(), animated: true)
        
    }

    internal lazy var rightBarBtn: UIBarButtonItem = {
        let rightBarBtn = UIBarButtonItem(title: "下一个", target: self, action: #selector(rightBarBtnClick))
        return rightBarBtn
    }()
    
}

extension YXTestViewController {
    
    override func setupTableView() {
        
        super.setupTableView()
        
        navItem.rightBarButtonItem = rightBarBtn
        
    }
    
}

